<template>
  <a-popover trigger="focus" :visible="clicked">
    <template slot="content">
      <h3 style="text-align: center;"><span >【{{ itm.JobTempletName }}】</span>   第{{ index + 1 }}行 {{ titleList[idx].name }}项</h3>
      <a-textarea v-model="item[text]" style="height: 100px; width: 800px; resize: none;" @focus="textFocus"
        @blur="textBlur" />
    </template>
    <a-input size="small" v-model="item[text]" @blur="inputBlur" @focus="inputFocus" />
  </a-popover>
</template>

<script>

export default {
  props: ['item', 'text', 'index', "titleList", "idx","itm"],
  data() {
    return {
      clicked: false,
      textShow: false,
    }
  },
  methods: {
    /* 聚焦大输入框 */
    textFocus() {
      this.clicked = true
      this.textShow = true
    },
    /* 失焦大输入框 */
    textBlur() {
      this.clicked = false
      this.textShow = false
    },
    inputFocus(e) {
      this.clicked = true
    },
    /* 输入框失去焦点时 */
    inputBlur() {
      if (this.textShow) {
        this.clicked = true
      } else {
        this.clicked = false
      }
    }

  }

}
</script>

<style></style>